<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Users extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create( 'users', function( $table ) {
        	$table->increments( 'id' )->unsigned();
        	$table->string( 'user_name', 128 )->unique()->index();
        	$table->string( 'email' )->unique()->index();
        	$table->string( 'password', 60 )->index();
			$table->string( 'remember_token', 100 )->nullable();
			$table->string( 'avatar_url', 100 )->default( '/img/avatar/default.png' );
			$table->timestamps();
			$table->softDeletes();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('users');
	}

}
